<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <link rel="icon" href="<%= BASE_URL %>login/entLogo?icon=true" />
    <title><%= htmlWebpackPlugin.options.title %></title>
    <script src="<%= BASE_URL %>config.js"></script>
  </head>
  <body>
    <noscript>
      <strong
        >We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
        properly without JavaScript enabled. Please enable it to
        continue.</strong
      >
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
    <script>
      // 判断是否为ie9一下的版本，给升级提示。
      function IEVersion() {
        var userAgent = navigator.userAgent
        if (
          userAgent.indexOf('Trident') !== -1 ||
          userAgent.indexOf('MSIE') !== -1
        ) {
          var IEReg = new RegExp('MSIE (\\d+\\.\\d+);')
          IEReg.test(userAgent)
          var IEVersionNum = parseFloat(RegExp['$1'])
          if (IEVersionNum <= 9) {
            //如果ie浏览器是小于等于ie9，则提示升级浏览器版本。
            return true
          } else {
            return false
          }
        } else {
          return false
        }
      }
      var tpl = [
        '<style>',
        '.iebrowser {',
        'text-align: center;',
        'background: #000;',
        'width: 100%;',
        'height: 100%;',
        'position: absolute;',
        'left: 0;',
        'top: 0;',
        'overflow: hidden;',
        '}',
        '.iebrowser_text {',
        'font-size: 35px;',
        'margin-top: 100px;',
        'margin-bottom: 100px;',
        'color: orange;',
        'font-family: "华文琥珀", "华文彩云", "幼圆", "黑体";',
        'user-select: none;',
        ' }',
        '.iebrowser_text2 {',
        'font-size: 30px;',
        'cursor: pointer;',
        'line-height: 1.4;',
        'transition: all 0.5s;',
        ' }',
        '.iebrowser_text2 a {',
        'display: inline-block;',
        'color: yellowgreen;',
        'text-decoration: none;',
        'border-bottom: 3px solid yellowgreen;',
        '}',
        '</style>',
        '<div class="iebrowser">',
        '<img src="../assets/image/404.png" alt="" draggable="false">',
        ' <p class="iebrowser_text">当前浏览器版本过低,升级IE高版本浏览器或使用谷歌浏览器...</p>',
        '<p class="iebrowser_text iebrowser_text2">',
        " <a href='https://www.google.cn/chrome/'>使用谷歌浏览器(建议使用)</a>",
        '</p>',
        '<p class="iebrowser_text iebrowser_text2" >',
        "<a href='https://support.microsoft.com/zh-cn/help/18520/download-internet-explorer-11-offline-installer'>升级IE浏览器</a>",
        '</p>',
        ' </div>',
      ].join('')
      window.onload = function () {
        if (IEVersion()) {
          document.write(tpl)
        }
      }
    </script>
  </body>
</html>
